<?php

namespace App\Http\Requests\AuthRequests;

use Illuminate\Foundation\Http\FormRequest;

class SmsCodeRequest extends FormRequest
{
    public function authorize()
    {
        return true;
    }

    public function rules()
    {
        return [
            'area' => ['nullable', 'numeric'],
            'mobile' => ['nullable', 'numeric'],
        ];
    }

    public function messages()
    {
        return [
            'area.numeric' => __('区号格式错误'),
            'mobile.numeric' => __('手机格式错误'),
        ];
    }
}
